﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Wijmo.Master" AutoEventWireup="true" CodeBehind="CloseBehavior.aspx.cs" Inherits="ControlExplorer.C1ToolTip.CloseBehavior" %>

<%@ Register Namespace="C1.Web.Wijmo.Controls.C1ToolTip" Assembly="C1.Web.Wijmo.Controls.3" TagPrefix="wijmo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
    <style type="text/css">
        .link
        {
            color: #000000;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:HyperLink ID="HyperLink1" runat="server" ToolTip="tooltip" CssClass="link">锚点</asp:HyperLink>
    <wijmo:C1ToolTip runat="server" ID="Tooltip1" TargetSelector="#HyperLink1">
    </wijmo:C1ToolTip>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Description" runat="server">
    <p>
       此示例演示不同的接近行为选项。</p>
    <p>
      在此示例中使用 <strong>closeBehavior</strong>客户端属性。
    </p>
    <p>
        该属性有三种选择：</p>
    <ul>
        <li><strong>auto</strong> -鼠标离开目标后工具提示将关闭</li>
        <li><strong>none</strong> - 除非在代码中，否则工具提示将永远不会被关闭。</li>
        <li><strong>sticky</strong> -  鼠标离开目标后，除点击关闭按钮或编写代码来关闭，否则工具提示将永远不会被关闭。</li>
    </ul>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ControlOptions" runat="server">
    <label>
        关闭行为</label>
    <select id="closeBehavior">
        <option value="auto" selected="selected">自动</option>
        <option value="none">无</option>
        <option value="sticky">黏着</option>
    </select>
    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            $("#closeBehavior").change(function () {
                $("#<%=HyperLink1.ClientID %>").c1tooltip("option", "closeBehavior", $("#closeBehavior").val());
            });

        });       
    </script>
</asp:Content>
